#include <stdio.h>
#include <string.h>

int main()
{
    char arr1[] = "abc";
    char arr2[] = {'a','b','c'};
    char arr3[] = {'a','b','c','\0'};//\0是字符串的结束标志
    //求字符串的长度
    printf("%lu\n",strlen(arr1));
    printf("%lu\n",strlen(arr2));//长度是随机的
    printf("%lu\n",strlen(arr3));//\0不在长度范围之内
    //打印字符串
    printf("%s\n",arr1);
    printf("%s\n",arr2);
    printf("%s\n",arr3);

    return 0;
}